package com.demo.dao;

import java.util.List;

import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.UpdateProvider;

import com.demo.model.Project;

public interface ProjectDao {

	@InsertProvider(type = com.demo.dao.mapper.ProjectMapper.class, method = "insert")
	@Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id")
	public int insert(Project project);

	@DeleteProvider(type = com.demo.dao.mapper.ProjectMapper.class, method = "delete")
	public Integer delete(long id);

	@UpdateProvider(type = com.demo.dao.mapper.ProjectMapper.class, method = "update")
	public Integer update(Project project);

	@SelectProvider(type = com.demo.dao.mapper.ProjectMapper.class, method = "select")
	public List<Project> select(String name);

	@SelectProvider(type = com.demo.dao.mapper.ProjectMapper.class, method = "selectOne")
	public Project selectOne(Integer id);

}
